package com.ghpt.service.impl;
import com.ghpt.mapper.ChouShuiMapper;
import com.ghpt.pojo.ChouShui;
import com.ghpt.service.ChouShuiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ChouShuiServiceImpl implements ChouShuiService {
    @Autowired
    private ChouShuiMapper chouShuiMapper;

    @Override
    public ChouShui findChouShuiById(Long id) {
        if (id != null) {
            return chouShuiMapper.selectById(id);
        }else {
            return null;
        }
    }
    @Override
    public int updateById(ChouShui chouShui) {
        return chouShuiMapper.updateById(chouShui);//更新成功为1否则为0
    }
}
